@echo off

call loadcp lib\*.jar > NUL

IF NOT "%1"=="" goto tool

echo \i db/cdep.sql > db/init.sql
echo commit; >> db/init.sql
echo shutdown compact; >> db/init.sql

java -cp %LOCALCLASSPATH% org.hsqldb.util.SqlTool --autoCommit --rcFile db/sqltool.rc cdep - < db/init.sql

del run.log* 2> NUL

goto exit

:tool

java -cp %LOCALCLASSPATH% org.hsqldb.util.SqlTool --rcFile db/sqltool.rc cdep

:exit
